<%@ page language="java" contentType="text/html; charset=UTF-8"
     pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta name="keywords" content="jquery,ui,easy,easyui,web">
	<meta name="description" content="easyui help you build your web page easily!">
	<title>Project Demo</title>
	<link rel="stylesheet" type="text/css" href="easyui/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="easyui/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="easyui/demo/demo.css">
	<script type="text/javascript" src="easyui/jquery.min.js"></script>
	<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
	<title>Project Management</title>	

</head>
<body>
	<script type="text/javascript">
	
	function saveProject2() {
		$('#fm').form('submit',{  
	        url: 'updateProject',  
	        onSubmit: function(){ 
	            return $(this).form('validate');  
	        },  
	        success: function(result){  
	        	alert('ok.请刷新，暂时的。');
	        }  
	    });  
	}
	</script>
  
				<div class="ftitle">Project Information</div>
				<form id="fm" method="post">
					
					<input name="id" type="hidden" value="${project.id}" />
					
					<div class="fitem">
					    <label for="flowId">Flow Id:</label> 
					    <input value="${project.flowId}" editable='false' data-options="url:'getAllFlow', valueField:'id', textField:'name', panelHeight:'auto'" id="slectFlowId" class="easyui-combobox" name="flowId" />        
					</div>
				
					<div class="fitem">
						<label>Project ID:</label> 
						<input name="projectId" class="easyui-validatebox" readonly value="${project.projectId}" required="true">
					</div>
					<div class="fitem">
						<label>Project Name:</label> 
						<input name="name" class="easyui-validatebox" readonly value="${project.name}"  required="true">
					</div>
					<div class="fitem">
						<label>Version:</label> 
						<input name="version" class="easyui-validatebox" readonly value="${project.version}" required="true">
					</div>
					<div class="fitem">
						<label>Start Time</label> 
						<input name="startTime" type="text" data-options="" value="${project.startTime}"  class="easyui-datetimebox" required style="width:150px">  
					</div>
					<div class="fitem">
						<label>End Time</label> 
						<input name="endTime" type="text" data-options="" class="easyui-datetimebox" value="${project.endTime}" required style="width:150px">  
					</div>
					
					<div class="fitem">
						<label>Comment</label> 
						<textarea name="comment" cols="50" rows="3">${project.comment}</textarea>  
					</div>
					 
				

                    <c:forEach var="item" items="${project.nodeList}" varStatus="status"> 

						<fieldset class='dynamic'> 
							<legend> ${item.nodeName} </legend>
							<input name="nodeList[${status.index}].id" type='hidden' value='${item.id}'/> 
							<div class='fitem'> 
								<label>Project Node Plan WorkLoad:</label> 
								<input name='nodeList[${status.index}].planWorkLoad' class='easyui-validatebox' required='true' value='${item.planWorkLoad}'/>
							</div>
							<div class='fitem'> 
								<label>Project Node Actual WorkLoad:</label> 
								<input name='nodeList[${status.index}].actWorkLoad' class='easyui-validatebox' required='true' value='${item.actWorkLoad}'/>
							</div>
	    					<div class='fitem'> 
	    						<label>Designer User Id:</label> 
	    						<input name='nodeList[${status.index}].userId' value='${item.userId}' data-options="url: 'getAllUser', valueField:'userID', textField:'userName',method: 'GET', disabled:'true'" class='easyui-combobox' required='true'/> 
	    					</div>  
						</fieldset>
						
					</c:forEach> 

				</form>
				<div id="dlg-buttons">
					<a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="saveProject2()">Save</a> 
		    	</div>
	

</body>
</html>

